These developers gave us a number of specific examples of how zApp is better than products that attempt to achieve object-oriented capabilities by creating a C++ wrapper around their C-based products. zApp was designed from the beginning as a C++ framework to take advantage of the built-in object oriented capabilities of C++.
The zApp product family was created as a result of Inmark's need to have a better means of developing cross-platform applications for the financial industry. Because of this, we built an object-oriented framework that models the way developers actually need to use objects. This gives our framework a number of key advantages:
Usability: The zApp framework is easy to use because the objects correspond to tasks that developers need.
Extensibility and Maintainability: The structure of a zApp application is intuitive, easy to understand, and readily extensible because the objects model usage.
Performance: zApp applications have superior performance because there is no extra layer wrapping another set of functions.
C++ was the language chosen for implementation, because its data abstraction capabilities allowed a higher level interface to be designed with no loss in flexibility. This results in the ability to write applications in less code than using C-based tools, but with equal efficiency. Additionally, the ability to inline functions means that, where appropriate, functions can map directly to underlying system calls with no extra function call overhead. This is especially important in areas such as graphics subsystems.
Here are a few examples of zApp's object-oriented structure that really set it apart. While no few features will show the depth of zApp, they will give you a feel of how it works.
How does a kid draw a picture? She dumps the crayons onto the table, grabs one, and has at it. If she wants a different color or size, she swaps crayons and continues drawing. zPens and zBrushes work the same way. You can construct them anywhere, not just within a paint event, and it isn't necessary to destroy one to create another. Unlike other APIs, zApp's approach to graphics accurately reflects the real world, and that makes programming intuitive.
What is great is that this same architectual setup also simplifies printing. In a WYSIWYG environment, you don't want to print the window -- complete with a system box and a caption -- just what's inside. In other words, you print the pane. All you do is redirect the pane's output to the printer device, and out it comes. No extra printing calls are required. Everyone knows that less codes makes applications easier to write, read, and maintain.
We chose a different tack. We created a family of formatter objects to handle masking and validation tasks. Depending on the parameter passed in the zStringEdit constructor, a different zFormatter is chosen. The advantage became apparent when we were designing our new zTable object. Because zFormatter are generic objects, they work with table cells exactly like they do with edit controls. No extra work was required to give our table object validation and formatting capabilities.
Instead of a monolithic structure, we provide several independent class hierarchies. Though on the surface that may appear less object-oriented than other software, the opposite is true. It is more efficient because developers can mix and match the objects they need without pulling in unnecessary code.
The only way to really experience the elegance of zApp's design is to use it. Spend a few hours rooting around in the source code and you'll find countless other examples of how we exploit the possibilities of object-oriented programming.
© Copyright 1995, Rogue Wave Software, Inc.